package com.future.baselib.utils;

import android.content.Context;

/**
 * Created by jniu on 2017/11/27.
 */

public class UserInfoSharePreference extends BasePreference {
    private static UserInfoSharePreference preference;

//        private String USER_TOKEN = "user_token";
    private String USER_INFO = "user_info";

    private  UserInfoSharePreference(Context context) {
        super(context,"userinfo");
    }

    public synchronized static UserInfoSharePreference getInstance(Context context){
        if (preference ==null) {
            preference = new UserInfoSharePreference(context.getApplicationContext());
        }
        return preference;
    }

//    public void setUserToken(String userToken){
//        setString(USER_TOKEN,userToken);
//    }
//
//    public String getUserToken(){
//        return getString(USER_TOKEN);
//    }
//
    public void setUserInfo(String userInfo){
        setString(USER_INFO,userInfo);
    }

    public String getUserInfo(){
        return getString(USER_INFO);
    }
}
